package com.example.backend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

// 订单信息表实体类
@Data
@TableName("order_info")
public class OrderInfo {
    // 交易单号，唯一标识
    @TableId(value = "transaction_id", type = IdType.NONE)
    private String transactionId;
    
    // 商品批次ID
    @TableField("batch_id")
    private String batchId;
    
    // 商品名称
    @TableField("product_name")
    private String productName;
    
    // 商品数量
    @TableField("quantity")
    private Integer quantity;
    
    // 商品单价
    @TableField("unit_price")
    private BigDecimal unitPrice;
    
    // 交易总金额
    @TableField("total_amount")
    private BigDecimal totalAmount;
    
    // 卖家账号
    @TableField("seller_id")
    private String sellerId;
    
    // 买家账号
    @TableField("buyer_id")
    private String buyerId;
    
    // 交易状态：pending-待支付, paid-已支付, shipped-已发货, completed-已完成, cancelled-已取消, returned-已退货
    @TableField("order_status")
    private String orderStatus;
    
    // 收货地址
    @TableField("shipping_address")
    private String shippingAddress;
    
    // 物流单号
    @TableField("logistics_id")
    private String logisticsId;
    
    // 成交时间
    @TableField("deal_time")
    private LocalDateTime dealTime;

    // 发货时间
    @TableField("deliver_time")
    private LocalDateTime deliverTime;

    //确认收货时间
    @TableField("confirm_receipt_time")
    private LocalDateTime confirmReceiptTime;
}